

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>LIGGGHTS(R)-PUBLIC 2.X vs. LIGGGHTS(R)-PUBLIC 1.- syntax changes &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>LIGGGHTS(R)-PUBLIC 2.X vs. LIGGGHTS(R)-PUBLIC 1.- syntax changes</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/liggghts_2.X_tutorial.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="liggghts-r-public-2-x-vs-liggghts-r-public-1-syntax-changes">
<h1>LIGGGHTS(R)-PUBLIC 2.X vs. LIGGGHTS(R)-PUBLIC 1.- syntax changes<a class="headerlink" href="#liggghts-r-public-2-x-vs-liggghts-r-public-1-syntax-changes" title="Permalink to this headline">¶</a></h1>
<div class="section" id="introduction">
<h2>Introduction:<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>This is a short outline of the most important changes in LIGGGHTS(R)-PUBLIC 2.X
compared to LIGGGHTS(R)-PUBLIC 1.5.3 regarding the syntax of major commands. The
motivation for these changes was to make the script language more readable and to
improve extendability (in the sense of object oriented programming) with respect
to modelling approaches.</p>
</div>
<div class="section" id="commands-covered-by-this-tutorial">
<h2>Commands covered by this tutorial:<a class="headerlink" href="#commands-covered-by-this-tutorial" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>atom_style sphere (formerly atom_style granular)</li>
<li>dump mesh/stl (formerly dump stl)</li>
<li>dump mesh/vtk (formerly dump mesh/gran/VTK)</li>
<li>fix heat/gran</li>
<li>fix mesh/surface (formerly fix mesh/gran)</li>
<li>fix mesh/surface/stress (formerly fix mesh/gran/stressanalysis)</li>
<li>fix move/mesh (formerly fix move/mesh/gran)</li>
<li>fix wall/gran/*</li>
<li>pair_style gran/*</li>
</ul>
</div>
<div class="section" id="changes-in-syntax-for-each-command">
<h2>Changes in syntax for each command:<a class="headerlink" href="#changes-in-syntax-for-each-command" title="Permalink to this headline">¶</a></h2>
<p>Changes are indicated as follows</p>
<div class="highlight-python"><div class="highlight"><pre>OLD: old_syntax
NEW: new_syntax
</pre></div>
</div>
<p>where <em>old_syntax</em> refers to the syntax used in LIGGGHTS(R)-PUBLIC 1.5.3 and before,
and <em>new_syntax</em> refers to the syntax used in LIGGGHTS(R)-PUBLIC 2.X</p>
<hr class="docutils" />
<p><strong>atom_style sphere (formerly atom_style granular):</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: atom_style granular
NEW: atom_style sphere
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For compatibility reasons, the old syntax can still be used in LIGGGHTS(R)-PUBLIC 2.0</p>
</div>
<p>For details, see <a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a>.</p>
<hr class="docutils" />
<p><strong>dump mesh/stl:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: dmpstl all stl 300 post/dump*.stl
NEW: dmpstl all mesh/stl 300 post/dump*.stl
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For compatibility reasons, the old syntax can still be used in LIGGGHTS(R)-PUBLIC 2.0</p>
</div>
<hr class="docutils" />
<p><strong>dump mesh/vtk:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: dmpstl all mesh/gran/VTK 300 post/dump*.stl id
NEW: dmpstl all mesh/vtk 300 post/dump*.stl id
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For compatibility reasons, the old syntax can still be used in LIGGGHTS(R)-PUBLIC 2.0</p>
</div>
<hr class="docutils" />
<p><strong>fix heat/gran:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID heat/gran 273.15
NEW: fix ID group-ID heat/gran initial_temperature 273.15
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID heat/gran 273.15 + activate area correction via fix property/global
NEW: fix ID group-ID heat/gran initial_temperature 273.15 area_correction yes
</pre></div>
</div>
<hr class="docutils" />
<p><strong>fix mesh/surface (formerly fix mesh/gran):</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID mesh/gran mesh.stl 1 1.0 0. 0. 0. 0. 0. 0.
NEW: fix ID group-ID mesh/surface file mesh.stl type 1
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID mesh/gran mesh.stl 1 0.001 0. 0. 0. -90. 0. 0.
NEW: fix ID group-ID mesh/surface file mesh.stl type 1 scale 0.001 rotate axis 1. 0. 0. angle -90.
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID mesh/gran mesh.stl 1 1.0 1. 2. 3. 0. 0. 0.
NEW: fix ID group-ID mesh/surface file mesh.stl type 1 move 1. 2. 3
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID mesh/gran mesh.stl 1 1.0 0. 0. 0. 0. 0. 0. conveyor 5. 0. 0.
NEW: fix ID group-ID mesh/surface file mesh.stl type 1 surface_vel 5. 0. 0.
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID mesh/gran mesh.stl 1 1.0 0. 0. 0. 0. 0. 0. rotate 0. 0. 0. 1. 0. 0. 5.
NEW: fix ID group-ID mesh/surface file mesh.stl type 1 surface_ang_vel origin 0. 0. 0. axis  1. 0. 0. omega 5.
</pre></div>
</div>
<p>For details, see <a class="reference internal" href="fix_mesh_surface.html"><em>fix mesh/surface</em></a>.</p>
<hr class="docutils" />
<p><strong>fix mesh/surface/stress (formerly fix mesh/gran/stressanalysis):</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID mesh/gran/stressanalysis mesh.stl 1 1.0 0. 0. 0. 0. 0. 0. finnie yes
NEW: fix ID group-ID fix mesh/surface/stress file mesh.stl type 1 wear finnie
</pre></div>
</div>
<p>For details, see <code class="xref doc docutils literal"><span class="pre">fix</span> <span class="pre">mesh/surface/stress</span></code>.</p>
<hr class="docutils" />
<p><strong>fix move/mesh (formerly fix move/mesh/gran):</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID move/mesh/gran wiggle -0.1 0. 0. 0.02 cad1 1
NEW: fix ID group-ID move/mesh mesh cad1 wiggle amplitude -0.1 0. 0. period 0.02
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID move/mesh/gran rotate 0. 0. 0. 0. 0. 1. 0.05 cad1 1
NEW: fix ID group-ID move/mesh mesh cad1 rotate origin 0. 0. 0. axis  0. 0. 1. period 0.05
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID move/mesh/gran linear 20. 20. 0. cad1 1
NEW: fix ID group-ID move/mesh mesh cad1 linear 20. 20. 0.
</pre></div>
</div>
<p>NOTES:</p>
<ul class="simple">
<li>The trailing &#8220;1&#8221; for the <em>old_syntax</em> was no longer used in LIGGGHTS(R)-PUBLIC 1.5.3</li>
<li>For compatibility reasons, the command name <em>fix move/mesh/gran</em> can be
used in LIGGGHTS(R)-PUBLIC 2.0. However, the syntax has to follow the LIGGGHTS(R)-PUBLIC 2.0 syntax.</li>
</ul>
<p>For details, see <a class="reference internal" href="fix_move_mesh.html"><em>fix move/mesh</em></a>.</p>
<hr class="docutils" />
<p><strong>fix wall/gran/*:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID wall/gran/hertz/history 1 0 mesh/gran 2 cad1 cad2
NEW: fix ID group-ID wall/gran/hertz/history mesh n_meshes 2 meshes cad1 cad2
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID wall/gran/hertz/history 1 0 xplane -0.5 0.5 1
NEW: fix ID1 group-ID wall/gran/hertz/history type 1 xplane -0.5
     fix ID2 group-ID wall/gran/hertz/history type 1 xplane 0.5
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID wall/gran/hertz/history 3 0 xplane -0.5 0.5 1
NEW: fix ID1 group-ID wall/gran/hertz/history primitive type 1 xplane -0.5 rolling_friction cdt
     fix ID2 group-ID wall/gran/hertz/history primitive type 1 xplane  0.5 rolling_friction cdt
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID wall/gran/hertz/history 1 1 xplane -0.5 0.5 1
NEW: fix ID group-ID wall/gran/hertz/history primitive type 1 xplane -0.5 0.5 cohesion sjkr
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: fix ID group-ID wall/gran/hertz/history 0 0 zcylinder 0.05 1
NEW: fix ID group-ID wall/gran/hertz/history primitive type 1 zcylinder 0.05 0. 0. tangential_damping off
</pre></div>
</div>
<p>NOTES:</p>
<ul class="simple">
<li>Same applies for hooke/history, hooke, hooke/history/simple, hertz/history/simple</li>
<li><em>sjkr</em> stands for &#8216;simplified JKR (Johnson-Kendall-Roberts)&#8217; model, and <em>cdt</em> for
&#8216;constant directional torque&#8217; model</li>
<li>styles <em>xplane</em>, <em>yplane</em>, <em>zplane</em> take only one arg now (the wall position), if
you want two walls you have to use two fix commands</li>
<li>in addition to the existing style <em>zcylinder</em>, there is now <em>xcylinder</em> and
<em>ycylinder</em> as well</li>
<li><em>xcylinder</em> <em>ycylinder</em> and <em>zcylinder</em> take 3 args: the cylinder radius, and
the location of the axis in the other two dimensions</li>
</ul>
<p>For details, see <a class="reference internal" href="fix_wall_gran.html"><em>fix wall/gran</em></a>.</p>
<hr class="docutils" />
<p><strong>pair_style gran/*:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>OLD: pair_style gran/hertz/history 1 0
NEW: pair_style gran/hertz/history
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: pair_style gran/hertz/history 3 0
NEW: pair_style gran/hertz/history rolling_friction cdt
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: pair_style gran/hertz/history 1 1
NEW: pair_style gran/hertz/history cohesion sjkr
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>OLD: pair_style gran/hertz/history 0 0
NEW: pair_style gran/hertz/history tangential_damping off
</pre></div>
</div>
<p>NOTES:</p>
<ul class="simple">
<li>Same applies for hooke/history, hooke, hooke/history/simple, hertz/history/simple</li>
<li><em>sjkr</em> stands for &#8220;simplified JKR (Johnson-Kendall-Roberts)&#8221; model, and <em>cdt</em> for &#8220;constant directional torque&#8221; model</li>
</ul>
<p>For details, see <a class="reference internal" href="pair_gran.html"><em>pair_style gran</em></a>.</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>